package com.yunhe.common.constant;

/**
 * 系统常量定义
 * @author liuronglei
 */
public class SystemConsts {

    // 请求头参数定义
    public enum HEADER {
        TOKEN("Access-Token", "Token对象"),
        USER_NAME("userName", "用户名"),
        PHONE("phone", "用户名"),
        USER_ID("userId", "用户ID"),
        FIRM_ID("firmId", "单位ID"),
        TIME_ZONE("timeZone", "时区"),
        STATION_ID("stationId", "电站ID"),
        SYSTEM_ID("systemId", "系统标识"),
        REMOTE_ADDRESS("remoteAddress", "真实ip"),
        ORG_ID("orgId", "组织ID"),
        ROLE_ID("roleId", "角色ID"),
        SYSTEM_PLATFORM("System-platform", "平台类型");
        private String value;
        private String title;

        HEADER(String value, String title) {
            this.value = value;
            this.title = title;
        }

        public String value() {
            return value;
        }
        public String title() {
            return title;
        }
    }

    // 操作类型定义
    public enum ACTION {
        ADD("add", "新增"),
        EDIT("edit", "编辑"),
        DELETE("delete", "删除"),
        SEARCH("search", "查询"),
        EXPORT("export", "导出"),
        STATUS_UPDATE("statusUpdate", "状态变更"),
        START("start", "开始"),
        END("end", "结束"),
        CLEAR("clear", "消除"),
        SHARE("share", "共享");
        private String value;
        private String title;
        ACTION(String value, String title) {
            this.value = value;
            this.title = title;
        }
        public String title() {
            return title;
        }
        public String value() {
            return value;
        }
        public boolean equals(String value) {
            return this.value().equals(value);
        }
    }

    // 时区定义
    public enum TIME_ZONE {
        UTC("UTC", "零时区"),
        China("Asia/Shanghai", "中国"),
        AustraliaQueensland("Australia/Queensland", "澳大利亚昆士兰");
        private String value;
        private String title;
        TIME_ZONE(String value, String title) {
            this.value = value;
            this.title = title;
        }
        public String title() {
            return title;
        }
        public String value() {
            return value;
        }
        public boolean equals(String value) {
            return this.value().equals(value);
        }
    }

    /**
     * 单位Logo类型
     */
    public enum FirmLogoType {
        Light("light", "浅色背景"),
        Dark("dark", "深色背景");
        private String value;
        private String title;
        FirmLogoType(String value, String title) {
            this.value = value;
            this.title = title;
        }
        public String title() {
            return title;
        }
        public String value() {
            return value;
        }
        public String value(String str) {
            return value + "_" + str;
        }
    }
}
